package com.administrator.scoreManageSys.entity.system;

import com.fasterxml.jackson.annotation.JsonInclude;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 系统权限 实体类
 *
 * @author Administrator
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class Permission {
    /**
     * 权限Id
     */
    private Long id;

    /**
     * 权限关键字符串
     */
    private String permission;

    /**
     * 父级
     */
    private Permission parent;
    /**
     * 父级id
     */
    private Long parentId;

    /**
     * 权限等级: (1 : 一级权限, 2 : 二级权限,3 : 三级权限)
     */
    private Integer grade;

    /**
     * 菜单名称
     */
    private String menuName;

    /**
     * 是否开启菜单 1 : YES, 0 : NO
     */
    private Integer menuOpend;

    /**
     * 序号
     */
    private Integer serialNumber;

    /**
     * 端路由
     */
    private String route;

    /**
     * 图标
     */
    private String icon;


    /**
     * 是否是选中的权限 0 不是 1 是
     */
    private Integer isItSelected = 0;
    /**
     * 子权限
     */
    private List<Permission> childrenPermission;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public Permission getParent() {
        return parent;
    }

    public void setParent(Permission parent) {
        this.parent = parent;
    }

    public Integer getGrade() {
        return grade;
    }

    public Integer getIsItSelected() {
        return isItSelected;
    }

    public void setIsItSelected(Integer isItSelected) {
        this.isItSelected = isItSelected;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public Integer getMenuOpend() {
        return menuOpend;
    }

    public void setMenuOpend(Integer menuOpend) {
        this.menuOpend = menuOpend;
    }

    public Integer getSerialNumber() {
        return serialNumber;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public void setSerialNumber(Integer serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getRoute() {
        return route;
    }

    public void setRoute(String route) {
        this.route = route;
    }

    public List<Permission> getChildrenPermission() {
        return childrenPermission;
    }

    public void setChildrenPermission(List<Permission> childrenPermission) {
        this.childrenPermission = childrenPermission;
    }
}
